#pragma once

#include <stdio.h>
#include <strsafe.h>
#include <vector>
#include <memory>
#include <map>
#include <queue>
#include <string>
#include <set>
#include <wrl.h>
#include <sal.h>
#include <concurrencysal.h>

#include <ppl.h>
#include <ppltasks.h>
#include <concurrencysal.h>
//#include <concurrent_priority_queue.h>
#include <concurrent_queue.h>
//#include <concurrent_unordered_map.h>
//#include <concurrent_unordered_set.h>
//#include <concurrent_vector.h>

// Requires Windows Runtime Support
#ifndef REIGN_DESKTOP
 #include <agile.h>
#endif

#pragma  warning( default: 4244 )

/// DirectX Sdk Includes

#include <d3d11_1.h>
#define XM_STRICT_VECTOR4 1
#include <DirectXMath.h>
#include <DirectXCollision.h>
#include <DirectXColors.h>

// Not supported in Windows Phone 8
#ifndef REIGN_PHONE
#include <wincodec.h>
#include <dxgi.h>
#include <d3dcommon.h>
#include <d2d1.h>
#include <d2d1helper.h>
#include <d2d1effects.h>
#include <d2d1_1.h>
#include <d2d1_1helper.h>
#include <d3d11.h>
// d3d11_1 supported for all platforms
#include <dwrite.h>
#include <dwrite_1.h>
#include <d3d11shader.h>
#include <d3dcompiler.h>
#endif

#include "SehnsuchtCore.hxx"
#include "ReignCore.hxx"
#include "ReignMath.hxx"

using namespace Reign::Standard;
namespace Sehnsucht // Graphics helper classes/functions
{
	// Makes DirectX APIs work with exceptions
    REIGN_HINTINLINING void ThrowIfFailed(HRESULT hr)
    {
        if (FAILED(hr))
        {
			ThrowWithHResult(hr);
        }
	};
};